//
//  GameRecharge.h
//  ELife
//
//  Created by xiaozhi on 11-5-17.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "GameRootController.h"
@class GameCardModel;
@class GameGoodsInfo;
@class GameServerModel;
@class GameChargeParam;

#define TAG_COMM_VIEW 1001
#define TAG_COMM_BUTTON 1002
#define TAG_OTHERVIEW 1003
#define TAG_QQVIEW 1004

#define INPUT_VALIDATE_CODE_OK 200
#define INPUT_VALIDATE_CODE_ACCOUNT_EMPTY 201
#define INPUT_VALIDATE_CODE_CONFIRM_EMPTY 202
#define INPUT_VALIDATE_CODE_DIFF 203
#define INPUT_VALIDATE_CODE_SERVER_EMPTY 204

@interface GameRechargeController : UIViewController <UITextFieldDelegate, UIActionSheetDelegate, GameListListener>{
    @private
    GameGoodsInfo *_gameGoodsInfo;
    NSMutableArray *_gameServerList;
    GameServerModel *_selectedGameServerModel;
    NSString *_selectedServer;
    GameChargeParam *_chargeParam;
    GameListType _chargeState;
    BOOL _isSecondList;
}

@property (retain, nonatomic) IBOutlet UIButton *pervalueButton;
@property (retain, nonatomic) IBOutlet UILabel *salevalueLabel;
@property (retain, nonatomic) IBOutlet UIButton *amountsButton;
@property (retain, nonatomic) IBOutlet UILabel *totalLabel;
@property (retain, nonatomic) IBOutlet UILabel *gameServerLabel;
@property (retain, nonatomic) IBOutlet UIButton *gameServerButton;

@property (retain, nonatomic) IBOutlet UILabel *gameAccountLabel;
@property (retain, nonatomic) IBOutlet UILabel *gameAccountConfirmLabel;
@property (retain, nonatomic) IBOutlet UITextField *gameAcountTextField;
@property (retain, nonatomic) IBOutlet UITextField *gameAcountConfirmTextField;
@property (retain, nonatomic) IBOutlet UITextField *qqAcountTextField;
@property (retain, nonatomic) IBOutlet UITextField *qqAcountConfirmTextField;

// init by chargeState
-(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
                state:(GameListType) chargeState
              goodsInfo:(GameGoodsInfo *)goodsInfo;

-(IBAction)openSpinner:sender;
-(IBAction)confirm;
-(IBAction)inputFinished;
-(IBAction)pickGameServer;
@end
